package com.ckcool.blog.controller;

import com.ckcool.blog.service.LoginService;
import com.ckcool.blog.vo.Result;
import com.ckcool.blog.vo.params.LoginParam;
import com.ckcool.blog.vo.params.RegisterParam;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @author ckcool
 */
@RestController
@RequestMapping("register")
public class RegisterController {
    @Resource
    private LoginService loginService;

    @PostMapping
    public Result register(@RequestBody RegisterParam registerParam) {
        return loginService.register(registerParam);
    }
}
